<div class="pdt10">
  <%= simple_form_for(@article) do |f| %>
      <%= f.error_notification %>
      <%= f.input :title,
                  label: "标题",
                  required: false,
                  autofocus: true,
                  wrapper_html: {class: "form-group"},
                  input_html: { class: "form-control",
                                id: "topic_title",
                                placeholder: "必填" }%>

      <div class="form-group">
      <%= f.label :article_content,label: "内容", class: "string optional"%>
      <%= f.kindeditor :content,
                  :owner => @article,
                  newlineTag: "br",
                  pasteType: "1",
                  allowFlashUpload: false,
                  allowMediaUpload: false,
                  allowFileUpload: false,
                  allowFileManager: false,
                  allowImageRemote: false,
                  htmlTags: { a: ['href', 'target', 'name'],
                              img: ['src', 'alt'],
                              pre: ['class'],
                              'ol,ul,li' => [],
                              'br,strong,b,s,del' => []},
                  :items => ['source','undo','redo','|',
                             'bold', 'strikethrough','insertorderedlist', 'insertunorderedlist', '|',
                             'link', 'unlink', 'code','|',
                             'image', 'flash', 'media','|',
                             'fullscreen'],
                  class: "form-control"%>
      <%= f.error :content%>
      </div>
      <br/>

      <div class="row">
        <div class="col-xs-12">
          <button type="submit" class="btn btn-default">提 交</button>
        </div>
      </div>
  <% end %>
</div>
<script language="JavaScript"> prettyPrint(); </script>